package org.aiforum.service;

import java.util.List;

import org.aiforum.common.Response;
import org.aiforum.dao.PlateDao;
import org.aiforum.domain.Plate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/*
 * 接口实现类
 */
@Service("plateService")
public class PlateServiceImpl implements PlateService {
	
	@Autowired
	private PlateDao plateDao;
    
	/*
	 * 处理查询
	 */
	public Response queryEnablePlate(int state) {
        Response response=new Response();
        List<Plate> plates=plateDao.queryPlateByState(state);
        boolean result= null !=plates && plates.size()>0;
        if(result){
        	response.setState(result);
        	response.setData(plates);
        }else{
        	response.setMessage("not result");
        }
		return response;
	}

}
